<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
           display: flex;
            width: 800px;
            height: 300px;
            background-color: pink;
            /* Y轴*/
            flex-direction: column;
            /* 主轴的居中对齐 */
            justify-content: center;
            /* 我们需要侧轴中间位置居中 */
            align-items: center;
            /* 开始位置居中 */
            align-items: flex-start;
            /* 底部位置居中 */
            align-items: flex-end;
            /* 拉伸。但是子盒子不要给高度 */
            align-items: stretch;
            
        }

        div span {
            width: 150px;
            height: 100px;
            background-color: gray;
        }
    </style>
</head>

<body>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
    
    </div>
</body>

</html>